<?php

declare(strict_types=1);

namespace App\Resource\Activity\Carnival\Champion;

use App\Enums\CarnivalEnum;
use Illuminate\Http\Resources\Json\JsonResource;

class Resource extends JsonResource
{
    public function toArray($request): ?array
    {
        return [
            'receive_status' => $this->receive_status ?? CarnivalEnum::RECEIVE_STATUS_NO,
            'is_show_rank'   => $this->is_show_rank ?? null,
            'sum_price'      => $this->sum_price ?? null,
            'room_id'        => null,
            'head_picture'   => $this->gift_user_data->head_picture ?? 'https://yoyo-pros.oss-cn-hangzhou.aliyuncs.com/image/1dcd4a78ec13c7e770a74d437a225c44446c7772.jpg',
            'user_code'      => $this->gift_user_data->user_code ?? null,
            'nickname'       => $this->gift_user_data->nickname ?? null,
        ];
    }
}
